package com.dujiawei.controller;

import com.dujiawei.entity.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class IndexController {

    @RequestMapping("/getUser")
    public User getUser(){

        User user = new User();
        user.setId(1);
        user.setName("张三");
        user.setGender("男");

        return user;
    }

    @RequestMapping("/getName")
    public User getName(){

        User user = new User();
        user.setId(1);
        user.setName("李四");
        user.setGender("男");

        return user;
    }
}
